package com.hmkj.admin.controller.risk;

import com.hmkj.admin.controller.BaseController;
import com.hmkj.common.baseMapper.GenericPo;
import com.hmkj.core.po.commo.Commo;
import com.hmkj.core.po.system.Bank;
import com.hmkj.core.service.commo.CommoService;
import lombok.extern.log4j.Log4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;
import java.util.List;

@Log4j
@Controller
@RequestMapping(BaseController.BASE_URI)
public class RiskController extends BaseController {

    @Resource
    CommoService commoService;

    /**
     * 风控参数列表
     * @return
     */
    @RequestMapping(value= "risk/detail", method = RequestMethod.GET)
    public String list(ModelMap modelMap) {
        // 交易品种列表
        List<Commo> commos = commoService.select(new Commo(t-> {
            t.setDelFlag(GenericPo.DELFLAG.NORMAL.code);
//            t.setStatus(Commo.STATUS.T1.code);
        }));

        modelMap.put("commoList", commos);
        return ok("risk/detail");
    }

}